Optimal. Leaf size=160 \[ -\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}+\frac {8 i a^4 \tan ^3(c+d x)}{3 d}+\frac {4 a^4 \tan ^2(c+d x)}{d}-\frac {8 i a^4 \tan (c+d x)}{d}+\frac {8 a^4 \log (\cos (c+d x))}{d}+8 i a^4 x-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3556, 3594, 3592, 3528, 3525, 3475} \[ -\frac {67 a^4 \tan ^4(c+d x)}{60 d}+\frac {8 i a^4 \tan ^3(c+d x)}{3 d}+\frac {4 a^4 \tan ^2(c+d x)}{d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {8 i a^4 \tan (c+d x)}{d}+\frac {8 a^4 \log (\cos (c+d x))}{d}+8 i a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3525
Rule 3528
Rule 3556
Rule 3592
Rule 3594
Rubi steps
\begin {align*} \int \tan ^3(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}+\frac {1}{6} a \int \tan ^3(c+d x) (a+i a \tan (c+d x))^2 (10 a+14 i a \tan (c+d x)) \, dx\\ &=-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}+\frac {1}{30} a \int \tan ^3(c+d x) (a+i a \tan (c+d x)) \left (106 a^2+134 i a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}+\frac {1}{30} a \int \tan ^3(c+d x) \left (240 a^3+240 i a^3 \tan (c+d x)\right ) \, dx\\ &=\frac {8 i a^4 \tan ^3(c+d x)}{3 d}-\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}+\frac {1}{30} a \int \tan ^2(c+d x) \left (-240 i a^3+240 a^3 \tan (c+d x)\right ) \, dx\\ &=\frac {4 a^4 \tan ^2(c+d x)}{d}+\frac {8 i a^4 \tan ^3(c+d x)}{3 d}-\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}+\frac {1}{30} a \int \tan (c+d x) \left (-240 a^3-240 i a^3 \tan (c+d x)\right ) \, dx\\ &=8 i a^4 x-\frac {8 i a^4 \tan (c+d x)}{d}+\frac {4 a^4 \tan ^2(c+d x)}{d}+\frac {8 i a^4 \tan ^3(c+d x)}{3 d}-\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\left (8 a^4\right ) \int \tan (c+d x) \, dx\\ &=8 i a^4 x+\frac {8 a^4 \log (\cos (c+d x))}{d}-\frac {8 i a^4 \tan (c+d x)}{d}+\frac {4 a^4 \tan ^2(c+d x)}{d}+\frac {8 i a^4 \tan ^3(c+d x)}{3 d}-\frac {67 a^4 \tan ^4(c+d x)}{60 d}-\frac {\tan ^4(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 \tan ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.40, size = 349, normalized size = 2.18 \[ \frac {a^4 \sec (c) \sec ^6(c+d x) \left (-780 i \sin (c+2 d x)+510 i \sin (3 c+2 d x)-366 i \sin (3 c+4 d x)+150 i \sin (5 c+4 d x)-86 i \sin (5 c+6 d x)+450 i d x \cos (3 c+2 d x)+345 \cos (3 c+2 d x)+180 i d x \cos (3 c+4 d x)+120 \cos (3 c+4 d x)+180 i d x \cos (5 c+4 d x)+120 \cos (5 c+4 d x)+30 i d x \cos (5 c+6 d x)+30 i d x \cos (7 c+6 d x)+225 \cos (3 c+2 d x) \log \left (\cos ^2(c+d x)\right )+90 \cos (3 c+4 d x) \log \left (\cos ^2(c+d x)\right )+90 \cos (5 c+4 d x) \log \left (\cos ^2(c+d x)\right )+15 \cos (5 c+6 d x) \log \left (\cos ^2(c+d x)\right )+15 \cos (7 c+6 d x) \log \left (\cos ^2(c+d x)\right )+15 \cos (c+2 d x) \left (15 \log \left (\cos ^2(c+d x)\right )+30 i d x+23\right )+10 \cos (c) \left (30 \log \left (\cos ^2(c+d x)\right )+60 i d x+49\right )+860 i \sin (c)\right )}{240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 254, normalized size = 1.59 \[ \frac {4 \, {\left (270 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 855 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 1350 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 1125 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 486 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + 86 \, a^{4} + 30 \, {\left (a^{4} e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{15 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 9.97, size = 326, normalized size = 2.04 \[ \frac {4 \, {\left (30 \, a^{4} e^{\left (12 i \, d x + 12 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 180 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 450 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 600 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 450 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 180 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 270 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 855 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 1350 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 1125 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 486 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + 30 \, a^{4} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 86 \, a^{4}\right )}}{15 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 134, normalized size = 0.84 \[ -\frac {8 i a^{4} \tan \left (d x +c \right )}{d}+\frac {a^{4} \left (\tan ^{6}\left (d x +c \right )\right )}{6 d}-\frac {4 i a^{4} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}-\frac {7 a^{4} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}+\frac {8 i a^{4} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {4 a^{4} \left (\tan ^{2}\left (d x +c \right )\right )}{d}-\frac {4 a^{4} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}+\frac {8 i a^{4} \arctan \left (\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 108, normalized size = 0.68 \[ \frac {10 \, a^{4} \tan \left (d x + c\right )^{6} - 48 i \, a^{4} \tan \left (d x + c\right )^{5} - 105 \, a^{4} \tan \left (d x + c\right )^{4} + 160 i \, a^{4} \tan \left (d x + c\right )^{3} + 240 \, a^{4} \tan \left (d x + c\right )^{2} + 480 i \, {\left (d x + c\right )} a^{4} - 240 \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 480 i \, a^{4} \tan \left (d x + c\right )}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.76, size = 100, normalized size = 0.62 \[ -\frac {8\,a^4\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )-4\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^2+\frac {7\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^4}{4}-\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^6}{6}+a^4\,\mathrm {tan}\left (c+d\,x\right )\,8{}\mathrm {i}-\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3\,8{}\mathrm {i}}{3}+\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^5\,4{}\mathrm {i}}{5}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.80, size = 250, normalized size = 1.56 \[ \frac {8 a^{4} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {- 1080 a^{4} e^{10 i c} e^{10 i d x} - 3420 a^{4} e^{8 i c} e^{8 i d x} - 5400 a^{4} e^{6 i c} e^{6 i d x} - 4500 a^{4} e^{4 i c} e^{4 i d x} - 1944 a^{4} e^{2 i c} e^{2 i d x} - 344 a^{4}}{- 15 d e^{12 i c} e^{12 i d x} - 90 d e^{10 i c} e^{10 i d x} - 225 d e^{8 i c} e^{8 i d x} - 300 d e^{6 i c} e^{6 i d x} - 225 d e^{4 i c} e^{4 i d x} - 90 d e^{2 i c} e^{2 i d x} - 15 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________